﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace DevExpress.CrmDemo.Win.Controls {
    public partial class Header : DevExpress.XtraEditors.XtraUserControl {
        public Header() {
            InitializeComponent();
        }

        [Browsable(true)]
        [DefaultValue(true)]
        public bool BackButtonVisible {
            get { return this.pictureBoxBack.Visible; }
            set { this.pictureBoxBack.Visible = value; }
        }

        [Browsable(true)]
        [DefaultValue("Title")]
        public string Title {
            get { return lblTitle.Text; }
            set { lblTitle.Text = value; }
        }

        private void bBack_Click(object sender, EventArgs e) {
            if (BackRequest != null) {
                BackRequest(this, null);
            }
        }

        public event EventHandler BackRequest;
    }
}
